<?php
namespace App\Logics;

use App\Models\AttrValModel;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Models\AttrTypeModel;

//逻辑处理
class AttrTypeLogic extends BaseLogic {


    public function __construct()
    {
        parent::__construct();

    }


    public static function getListByGoodsId(int $goods_id,$fields=['*']){
        $data= AttrTypeModel::where('goods_id',$goods_id)->select($fields)->get();
        return ob_to_array($data);
    }

    public static function pluck($name,$key=null,array $where=[]){
        $data= AttrTypeModel::where($where)->pluck($name,$key);
        return ob_to_array($data);
    }









}
